package com.kuangshen.scanner;

import java.util.Scanner;
public class Demo3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入:");
        if(scanner.hasNextInt()){
            int i = scanner.nextInt();
            System.out.println("您输入的内容为:"+i);
        }else{
            System.out.println("您输入的不是整数");
        }
        scanner.close();
    }
}
